package com.rgz.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class UserExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public UserExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIdQIsNull() {
            addCriterion("id_Q is null");
            return (Criteria) this;
        }

        public Criteria andIdQIsNotNull() {
            addCriterion("id_Q is not null");
            return (Criteria) this;
        }

        public Criteria andIdQEqualTo(Integer value) {
            addCriterion("id_Q =", value, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQNotEqualTo(Integer value) {
            addCriterion("id_Q <>", value, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQGreaterThan(Integer value) {
            addCriterion("id_Q >", value, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQGreaterThanOrEqualTo(Integer value) {
            addCriterion("id_Q >=", value, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQLessThan(Integer value) {
            addCriterion("id_Q <", value, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQLessThanOrEqualTo(Integer value) {
            addCriterion("id_Q <=", value, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQIn(List<Integer> values) {
            addCriterion("id_Q in", values, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQNotIn(List<Integer> values) {
            addCriterion("id_Q not in", values, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQBetween(Integer value1, Integer value2) {
            addCriterion("id_Q between", value1, value2, "idQ");
            return (Criteria) this;
        }

        public Criteria andIdQNotBetween(Integer value1, Integer value2) {
            addCriterion("id_Q not between", value1, value2, "idQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQIsNull() {
            addCriterion("userName_Q is null");
            return (Criteria) this;
        }

        public Criteria andUsernameQIsNotNull() {
            addCriterion("userName_Q is not null");
            return (Criteria) this;
        }

        public Criteria andUsernameQEqualTo(String value) {
            addCriterion("userName_Q =", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQNotEqualTo(String value) {
            addCriterion("userName_Q <>", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQGreaterThan(String value) {
            addCriterion("userName_Q >", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQGreaterThanOrEqualTo(String value) {
            addCriterion("userName_Q >=", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQLessThan(String value) {
            addCriterion("userName_Q <", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQLessThanOrEqualTo(String value) {
            addCriterion("userName_Q <=", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQLike(String value) {
            addCriterion("userName_Q like", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQNotLike(String value) {
            addCriterion("userName_Q not like", value, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQIn(List<String> values) {
            addCriterion("userName_Q in", values, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQNotIn(List<String> values) {
            addCriterion("userName_Q not in", values, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQBetween(String value1, String value2) {
            addCriterion("userName_Q between", value1, value2, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andUsernameQNotBetween(String value1, String value2) {
            addCriterion("userName_Q not between", value1, value2, "usernameQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQIsNull() {
            addCriterion("password_Q is null");
            return (Criteria) this;
        }

        public Criteria andPasswordQIsNotNull() {
            addCriterion("password_Q is not null");
            return (Criteria) this;
        }

        public Criteria andPasswordQEqualTo(String value) {
            addCriterion("password_Q =", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQNotEqualTo(String value) {
            addCriterion("password_Q <>", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQGreaterThan(String value) {
            addCriterion("password_Q >", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQGreaterThanOrEqualTo(String value) {
            addCriterion("password_Q >=", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQLessThan(String value) {
            addCriterion("password_Q <", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQLessThanOrEqualTo(String value) {
            addCriterion("password_Q <=", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQLike(String value) {
            addCriterion("password_Q like", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQNotLike(String value) {
            addCriterion("password_Q not like", value, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQIn(List<String> values) {
            addCriterion("password_Q in", values, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQNotIn(List<String> values) {
            addCriterion("password_Q not in", values, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQBetween(String value1, String value2) {
            addCriterion("password_Q between", value1, value2, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andPasswordQNotBetween(String value1, String value2) {
            addCriterion("password_Q not between", value1, value2, "passwordQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQIsNull() {
            addCriterion("birthday_Q is null");
            return (Criteria) this;
        }

        public Criteria andBirthdayQIsNotNull() {
            addCriterion("birthday_Q is not null");
            return (Criteria) this;
        }

        public Criteria andBirthdayQEqualTo(Date value) {
            addCriterionForJDBCDate("birthday_Q =", value, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQNotEqualTo(Date value) {
            addCriterionForJDBCDate("birthday_Q <>", value, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQGreaterThan(Date value) {
            addCriterionForJDBCDate("birthday_Q >", value, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("birthday_Q >=", value, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQLessThan(Date value) {
            addCriterionForJDBCDate("birthday_Q <", value, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("birthday_Q <=", value, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQIn(List<Date> values) {
            addCriterionForJDBCDate("birthday_Q in", values, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQNotIn(List<Date> values) {
            addCriterionForJDBCDate("birthday_Q not in", values, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("birthday_Q between", value1, value2, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andBirthdayQNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("birthday_Q not between", value1, value2, "birthdayQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQIsNull() {
            addCriterion("roleId_Q is null");
            return (Criteria) this;
        }

        public Criteria andRoleidQIsNotNull() {
            addCriterion("roleId_Q is not null");
            return (Criteria) this;
        }

        public Criteria andRoleidQEqualTo(Integer value) {
            addCriterion("roleId_Q =", value, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQNotEqualTo(Integer value) {
            addCriterion("roleId_Q <>", value, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQGreaterThan(Integer value) {
            addCriterion("roleId_Q >", value, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQGreaterThanOrEqualTo(Integer value) {
            addCriterion("roleId_Q >=", value, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQLessThan(Integer value) {
            addCriterion("roleId_Q <", value, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQLessThanOrEqualTo(Integer value) {
            addCriterion("roleId_Q <=", value, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQIn(List<Integer> values) {
            addCriterion("roleId_Q in", values, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQNotIn(List<Integer> values) {
            addCriterion("roleId_Q not in", values, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQBetween(Integer value1, Integer value2) {
            addCriterion("roleId_Q between", value1, value2, "roleidQ");
            return (Criteria) this;
        }

        public Criteria andRoleidQNotBetween(Integer value1, Integer value2) {
            addCriterion("roleId_Q not between", value1, value2, "roleidQ");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}